package com.qf.entity;
import com.alibaba.druid.sql.visitor.functions.Char;
import java.math.BigDecimal;
import java.util.Date;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 订单实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Order {
    /**
     * 额外添加一个username字段
     */

    @ExcelProperty(value = "用户名", index = 2)
    private String username;

    /**
     * 订单ID
     */
    @ExcelProperty(value = "订单ID", index = 0)
    private Long id;

    /**
     * 订单编号
     */
    @ExcelProperty(value = "订单编号", index = 1)
    private String orderNo;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 订单总金额
     */
    @ExcelProperty(value = "订单总金额", index = 5)
    private BigDecimal totalAmount;

    /**
     * 支付状态 0未支付 1已支付
     */
    private Integer payStatus;

    /**
     * 订单状态 0待发货 1已发货 2已完成 3退款中 4已关闭
     */
    @ExcelProperty(value = "订单状态", index = 7)
    private Integer orderStatus;

    /**
     * 支付时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date payTime;

    /**
     * 发货时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date deliveryTime;

    /**
     * 收货时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date receiveTime;

    /**
     * 取消时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date cancelTime;

    /**
     *当前时间戳
     */
    @ExcelProperty(value = "提交时间", index = 6)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date createdAt;

    /**
     *更新时间戳
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;

    /**
     * 暂定列
     */
    private String isDeleted;

    /**
     * 暂定列
     */
    private String attr2;

    /**
     * 暂定列
     */
    private String attr3;

    /**
     * 暂定列
     */
    private String attr4;

}
